package GUIComponents.dailyComponents;

import MainClasses.*;
import GUIComponents.*;
import java.awt.GridLayout;
import javax.swing.*;



/**
 *
 * @author andrewcutler
 */
public class DailyClassPanel extends JPanel{

    public GUIComponents.DayPanel today;
    public GUIComponents.DayPanel tomorrow;
    public Course course;
    
    public DailyClassPanel(Course c) {
        
        course = c;
        
        this.setLayout(new GridLayout(1, 3));        
        this.add(new ClassInfoPanel(course));
        today = new GUIComponents.DayPanel(main.getCurrentDate(0), course);
        tomorrow = new GUIComponents.DayPanel(main.getCurrentDate(1), course);
        this.add(today);
        this.add(tomorrow);
    }
    
    public String toString()
    {
        return course.getCourseName();
    }
    
    public void reset()
    {
        this.remove(today);
        this.remove(tomorrow);
        
        today = new GUIComponents.DayPanel(main.getCurrentDate(0), course);
        tomorrow = new GUIComponents.DayPanel(main.getCurrentDate(1), course);
        
        this.add(today);
        this.add(tomorrow);
    }

}
